package cn.jhz.learn.blog.test.core;

import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import cn.jhz.learn.blog.common.bean.JsonData;

@RestController
@RequestMapping("/{blog_id}")
public class CommentController {
	
	@PostMapping("/article/comment")
	public JsonData submitArticleComment(@PathVariable("blog_id") String blogId) {
		//TODO:待设计VO
		return JsonData.success();
	}
	
	@PostMapping("/essay/comment")
	public JsonData submitEssayComment(@PathVariable("blog_id") String blogId) {
		//TODO:待设计VO
		return JsonData.success();
	}
	
	@DeleteMapping("/article/comment/{comment_id}")
	public JsonData removeArticleComment(@PathVariable("blog_id") String blogId, @PathVariable("comment_id") Integer commentId) {
		return JsonData.success();
	}
	
	@DeleteMapping("/essay/comment/{comment_id}")
	public JsonData removeEssayComment(@PathVariable("blog_id") String blogId, @PathVariable("comment_id") Integer commentId) {
		return JsonData.success();
	}
	
//	@GetMapping("/article/comment/{comment_id}")
//	public JsonData findArticleComment(@PathVariable("blog_id") String blogId, @PathVariable("article_id") Integer articleId) {
//		//TODO:待设计VO
//		return JsonData.success();
//	}
//	
//	@GetMapping("/essay/comment/{comment_id}")
//	public JsonData findEssayComment(@PathVariable("blog_id") String blogId, @PathVariable("article_id") Integer articleId) {
//		//TODO:待设计VO
//		return JsonData.success();
//	}
}
